home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / c / cprn_rg.exe / CPRINTS.H < prev    next >
C/C++ Source or Header  |  1993-01-05  |  1KB  |  31 lines

  1. /*  cprints.h - declares cprints, a function that provides direct output
  2. **        the video buffer in a PC.
  3. **
  4. **  cprints was designed to perform realtime screen output of printf formatted
  5. **  data. It is called just like printf, with the addition of two integer
  6. **  parameters before the format string. These integers, r and c, are the
  7. **  row and column, respectively, from the upper-left corner of the screen
  8. **  where output should begin, relative to zero. Since cprints uses _vsnprintf,
  9. **  it is undesirable to invoke it from an interrupt routine when it has
  10. **  already been invoked elsewhere. Therefore, in_cprints provides an
  11. **  indication that cprints is active, and cprints_collisions provides a count
  12. **  of these occurrances for error logging, etc. Use at your own risk!
  13. **
  14. **  Copyright 1993, Reinhold J. Gerharz
  15. */
  16.  
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20.  
  21. extern unsigned int in_cprints;          /* non-zero when cprints is active */
  22. extern unsigned long cprints_collisions;  /* counts simultaneous invokations */
  23. extern unsigned int cprints_attribute;      /* allow changing video attributes */
  24.  
  25. int cprints( int r, int c, char *fmt, ... );
  26. void __fastcall crtputs( int r, int c, char *p);
  27.  
  28. #ifdef __cplusplus
  29.     }
  30. #endif
  31.